package com.finance.rule.request;


import com.finance.base.constant.PatternConstants;
import com.finance.framework.lang.valid.EnumValid;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;


@Data
public class PieceRangeImportReq {

    @Length(max = 10, message = "规则别名长度小于10")
    private String nickName;//规则别名

    @NotBlank(message = "供货商不能为空或者不能有误")
    private String supplierCode;

    private String snapshot;

    @NotBlank(message = "省份不能为空或者不能有误")
    private String province;//省份编码

    @NotBlank(message = "机构类型不能为空或者不能有误")
    private String settlementType;

    private String city;

    private String county;

    @NotBlank(message = "运单配送类型不能为空或者不能有误")
    private String direction;

    @Length(max = 11, message = "首件单价不能超过11位")
    @Pattern(regexp = PatternConstants.PATTERN_NUMBER_TWO_DECIMAL_POINT, message = "首件单价最多两位小数")
    private String firstPrice;//首件单价（元）

    @Length(max = 11, message = "拖件单价不能超过11位")
    @Pattern(regexp = PatternConstants.PATTERN_NUMBER_TWO_DECIMAL_POINT, message = "拖件单价最多两位小数")
    private String secondPrice;//拖件单价（元）

    @EnumValid(enums = {"0", "1"}, message = "运输温度等级有误")
    private String temperature;//运输温度等级 枚举 (0常温 1生鲜冷链)

    @EnumValid(enums = {"0", "1", "2"}, message = "包裹大小规格有误")
    private String packageSize;//包裹大小规格 枚举 (0未知 1小件 2大件)

    @EnumValid(enums = {"0", "1"}, message = "签收方式有误")
    private String signer;//签收方式 (1是0非)

    @EnumValid(enums = {"0", "1", "2", "3", "4", "5", "6", "7", "8"}, message = "配送时效要求有误")
    private String expressScheduleType;//配送时效要求 枚举 0未知 1当日达 2次晨达 3三日达 4工作日 5节假日 6夜间配 7上午达 8下午达

    @EnumValid(enums = {"0", "1"}, message = "是否含待收款枚举")
    private String cod;//是否含待收款


    private String supplierCodeImport;
    private String provinceImport;
    private String cityImport;
    private String countyImport;
    private String temperatureImport;
    private String packageSizeImport;
    private String signerImport;
    private String expressScheduleTypeImport;
    private String codImport;
    private String settlementTypeImport;
    private String directionImport;

    @NotBlank(message = "市不能有误")
    private String cityError;

    @NotBlank(message = "区县不能有误")
    private String countryError;


}